<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			var num=prompt("输入成绩数量","");
			var n=parseInt(num);
			var sum=0;
			var count=0;
			if(!isNaN(n)&&n>0){
				for (var i=0;i<n;i++) {
					count++;
					var num1=prompt("输入第"+count+"成绩","");
					var n1=parseInt(num1);
					sum=sum+n1;
				}
				alert("总成绩"+sum);
			}else{
				alert("输入错误！")
			}
			
			
			
		</script>
	</head>
	<body>
	</body>
</html>
